import request from '@/utils/request'
import url from 'postcss-url'



export default {

  //医院设置列表
  getHospSetList(current, limit, searchObj) {
    return request({
      url: `/admin/hosp/hospitalSet/findPageHospSet/${current}/${limit}`,
      method: 'post',
      data: searchObj  //使用json
    })
  },
  //删除医院设置
  deleteHospSet(id) {
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'delete'
    })
  },
  //批量删除
  batchRemoveHospSet(idList) {
    return request({
      url: `/admin/hosp/hospitalSet/batchRemove`,
      method: 'delete',
      data: idList
    })
  },
  //锁定和取消锁定
  lockHospitalSet(id, status) {
    return request({
      url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  },
  // 添加
  hospSetAdd(hospSet) {
    return request({
      // ?
      url: `/admin/hosp/hospitalSet/saveHospitalSet`,
      method: 'post',
      data: hospSet
    })
  },
  // 根据id查1条数据
  getById(id){
    return request({
      url: `/admin/hosp/hospitalSet/getHospSet/${id}`,
      method: 'get'
    })
  },
  // 修改
  updateById(hospitalSet){
    return request({
      url: `/admin/hosp/hospitalSet/updateById`,
      method: 'post',
      data: hospitalSet
    })
  },
  // 添加
  saveById(hospitalSet){
    return request({
      url: '/admin/hosp/hospitalSet/saveById',
      method: 'post',
      data: hospitalSet
    })
  }
}
